from appium import webdriver
import pytest
import time
class Test_abc():
    def setup_class(self):
        device_cap = {}
        device_cap["platformName"] = "Android"
        device_cap["platformVersion"] = "7.1.2"
        device_cap["deviceName"] = "127.0.0.1:62001"
        device_cap["appPackage"] = "com.android.settings"
        device_cap["appActivity"] = ".Settings"

        self.driver = webdriver.Remote("http://127.0.0.1:4723/wd/hub", device_cap)

    def teardown_class(self):
        self.driver.close_app()
        self.driver.quit()


    def test_a(self):
        self.driver.find_element_by_xpath("//*[contains(@text,'更多')]").click()
        assert 1
        #time.sleep(3)

    def test_b(self):
        print("\ntest_b")
        assert 0

if __name__ == '__main__':
    pytest.main(["test-base.py"])
